$(function() {
    if (!Modernizr.input.placeholder)
    {
		$('[placeholder]').each(function(){
			$(this).val($(this).attr('placeholder'))
					.addClass('placeholder');
		});
		
        $('[placeholder]').focus(function()
        {
			var t = $(this);
            if (t.val() == t.attr('placeholder'))
            {
                t.val('')
					.removeClass('placeholder');
            }
        }).blur(function()
        {
			var t = $(this);
            if (t.val() == '' || t.val() == t.attr('placeholder'))
            {
                t.val(t.attr('placeholder'))
					.addClass('placeholder');
            }
        });
 
        $('[placeholder]').parents('form').submit(function()
        {
            $(this).find('[placeholder]').each(function()
            {
                if (t.val() == t.attr('placeholder'))
                {
                    t.val('');
                }
            })
        });
    }
});